home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / pcboard / prfl200.zip / PROFILE.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-06-16  |  6KB  |  294 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     String   STRING001
  22.     String   STRING002
  23.     String   STRING003
  24.     String   STRING004
  25.     String   STRING005
  26.     String   STRING006
  27.     String   STRING007
  28.     String   STRING008
  29.     String   STRING009
  30.     String   STRING010
  31.     String   STRING011
  32.     String   STRING012
  33.     String   STRING013
  34.     String   STRING014
  35.     String   STRING015
  36.     String   STRING016
  37.     String   STRING017
  38.     String   STRING018
  39.     String   STRING019
  40.     String   STRING020
  41.     String   STRING021
  42.     String   STRING022
  43.     String   STRING023
  44.     String   STRING024
  45.     String   STRING025
  46.     String   STRING026
  47.     String   STRING027
  48.     BigStr   BIGSTR001
  49.  
  50. ;------------------------------------------------------------------------------
  51.  
  52.     GetUser
  53.     STRING001 = TokenStr()
  54.     Tokenize STRING001
  55.     Select Case (Upper(STRING001))
  56.         Case "H", "HELP"
  57.             Goto LABEL004
  58.         Case "SET"
  59.             Goto LABEL008
  60.         Case ""
  61.             Goto LABEL003
  62.         Case "L", "LIST"
  63.             Goto LABEL007
  64.         Case Upper((STRING001 == "SY"))
  65.             If (U_Sec >= SysopSec()) Then
  66.                 Goto LABEL009
  67.             Else
  68.                 End
  69.             Endif
  70.         Case Upper((STRING001 == "SYSO"))
  71.             If (U_Sec >= SysopSec()) Then
  72.                 Goto LABEL009
  73.             Else
  74.                 End
  75.             Endif
  76.             If (TokCount() == 3) Then
  77.                 STRING001 = GetToken() + " " + GetToken() + " " + GetToken()
  78.             Else
  79.                 STRING001 = GetToken() + " " + GetToken()
  80.             Endif
  81.             Tokenize STRING001
  82.             If (TokCount() == 3) Then
  83.                 INTEGER002 = Len(GetToken()) + Len(GetToken()) + 2
  84.             Else
  85.                 INTEGER002 = Len(GetToken()) + 1
  86.             Endif
  87.             INTEGER001 = Len(STRING001)
  88.             INTEGER001 = INTEGER001 - INTEGER002
  89.             STRING002 = U_RecNum(STRING001)
  90.             If (STRING002 == -1) Then
  91.                 Goto LABEL005
  92.             Endif
  93.             If (Exist(PPEPath() + "PROFILE.CFG")) Then
  94.                 FOpen 2, PPEPath() + "PROFILE.CFG", 0, 0
  95.                 FGet 2, STRING025
  96.                 FGet 2, STRING026
  97.                 FGet 2, STRING027
  98.                 FClose 2
  99.                 If (Ferr(1)) Then
  100.                     PrintLn "Error opening Configuration File. Inform SysOp Immediately!"
  101.                 Endif
  102.             Else
  103.                 PrintLn "Configuration file does not exist. This program will not run without"
  104.                 PrintLn "the 'PROFILE.CFG' file in the same directory as the 'PROFILE.PPE'."
  105.                 End
  106.             Endif
  107.             FOpen 1, STRING027 + "\INDEX-" + Left(Right(STRING001, INTEGER001), 1), 2, 0
  108.             :LABEL001
  109.             FGet 1, BIGSTR001
  110.             INTEGER001 = Len(STRING001)
  111.         Case STRING001
  112.             FSeek 1, -700, 1
  113.             FRead 1, BIGSTR001, 700
  114.             FClose 1
  115.             Goto LABEL002
  116.         Case ""
  117.             Goto LABEL006
  118.         Case Else
  119.             Goto LABEL001
  120.     End Select
  121.     :LABEL002
  122.     STRING003 = Mixed(STRING001)
  123.     FClose 1
  124.     GetAltUser STRING002
  125.     Gosub LABEL010
  126.     PrintLn "Ok, here's the info for@X0D ", STRING003, "@X0C..."
  127.     Newline
  128.     PrintLn "@X0AReal Name@X0F:@X0E ", Left(STRING003, 31), "@X0ASex@X0F:@X0E ", STRING004, "  @X0AAge@X0F:@X0E ", STRING005
  129.     PrintLn "@X0ACity@X0F/@X0AState@X0F:@X0E ", Left(Mixed(U_City), 30), "@X0ALast Date on@X0F:@X0E ", U_LDate()
  130.     PrintLn "@X0AVoice Phone@X0E#@X0F:@X0E ", Left(STRING008, 28), "@X0ALast Time on@X0F:@X0E ", U_LTime()
  131.     PrintLn "@X0AComp. Phone@X0E#@X0F:@X0E ", Left(STRING010, 28), "@X0ALast Updated@X0F:@X0E ", STRING023
  132.     PrintLn "@X0AMarital Status@X0F:@X0E ", Left(STRING006, 26)
  133.     PrintLn "@X0AAlias's@X0F:@X0E ", Left(STRING007, 33), "@X0ABBS Name@X0F:@X0E ", STRING011
  134.     PrintLn "@X0APhysical Description@X0F:@X0E ", STRING009
  135.     PrintLn "@X0AFavorite Movie@X0F:@X0E", Left(STRING014, 25)
  136.     PrintLn "@X0AFavorite TV Show@X0F: @X0E", STRING015
  137.     PrintLn "@X0AFavorite Music@X0F: @X0E", Left(STRING016, 35)
  138.     PrintLn "@X0AFavorite Foods@X0F: @X0E", STRING018
  139.     PrintLn "@X0AFavorite Sport@X0F: @X0E", STRING019
  140.     PrintLn "@X0AInstrument@X0F:@X0E ", STRING017
  141.     PrintLn "@X0AGoal's in Life@X0F:@X0E ", STRING013
  142.     PrintLn "@X0AHobbies@X0F/@X0AInterests@X0F:@X0E ", STRING020
  143.     PrintLn "@X0AOther BBS@X0F'@X0As you call@X0F:@X0E ", STRING024
  144.     PrintLn "@X0AOccupation@X0F:@X0E ", STRING012
  145.     PrintLn "@X0AGeneral Info@X0F:@X0E ", STRING021
  146.     PrintLn "@X0ASummary@X0F:@X0E ", STRING022
  147.     End
  148.     :LABEL003
  149.     If (Exist(PPEPath() + PPEName() + ".HLP")) DispFile PPEPath() + PPEName() + ".HLP", 1
  150.     End
  151.     :LABEL004
  152.     If (Exist(PPEPath() + PPEName() + "2.HLP")) DispFile PPEPath() + PPEName() + "2.HLP", 1
  153.     End
  154.     :LABEL005
  155.     Newline
  156.     PrintLn "@X0BSorry but that user is not a current user on this BBS."
  157.     End
  158.     :LABEL006
  159.     Newline
  160.     PrintLn "@X0DSorry but that user has not filled out a Profile yet."
  161.     End
  162.     :LABEL007
  163.     If (Exist(PPEPath() + "LIST.PPE")) Then
  164.         Call PPEPath() + "LIST.PPE"
  165.     Else
  166.         PrintLn "Listing file missing. Inform the SysOp Immediately."
  167.     Endif
  168.     End
  169.     :LABEL008
  170.     If (Exist(PPEPath() + "SETUP.PPE")) Then
  171.         Call PPEPath() + "Setup.PPE"
  172.     Else
  173.         PrintLn "Setup file missing. Inform the SysOp Immediately."
  174.     Endif
  175.     End
  176.     :LABEL009
  177.     If (Exist(PPEPath() + "SYSOP.PPE")) Then
  178.         Call PPEPath() + "SysOp.PPE"
  179.     Else
  180.         PrintLn "SysOp file missing. Inform the SysOp Immediately."
  181.     Endif
  182.     End
  183.     :LABEL010
  184.     STRING004 = Right(Left(BIGSTR001, 27), 1)
  185.     STRING005 = Right(Left(BIGSTR001, 31), 3)
  186.     STRING006 = Right(Left(BIGSTR001, 57), 25)
  187.     STRING007 = Right(Left(BIGSTR001, 83), 25)
  188.     STRING008 = Right(Left(BIGSTR001, 96), 12)
  189.     STRING009 = Right(Left(BIGSTR001, 151), 54)
  190.     STRING010 = Right(Left(BIGSTR001, 164), 12)
  191.     STRING011 = Right(Left(BIGSTR001, 191), 26)
  192.     STRING014 = Right(Left(BIGSTR001, 217), 25)
  193.     STRING015 = Right(Left(BIGSTR001, 243), 25)
  194.     STRING016 = Right(Left(BIGSTR001, 279), 35)
  195.     STRING017 = Right(Left(BIGSTR001, 300), 20)
  196.     STRING018 = Right(Left(BIGSTR001, 336), 35)
  197.     STRING019 = Right(Left(BIGSTR001, 372), 35)
  198.     STRING020 = Right(Left(BIGSTR001, 428), 55)
  199.     STRING021 = Right(Left(BIGSTR001, 484), 55)
  200.     STRING012 = Right(Left(BIGSTR001, 520), 35)
  201.     STRING013 = Right(Left(BIGSTR001, 571), 50)
  202.     STRING023 = Right(Left(BIGSTR001, 580), 8)
  203.     STRING022 = Right(Left(BIGSTR001, 646), 65)
  204.     STRING024 = Right(Left(BIGSTR001, 697), 50)
  205.     Return
  206.     End
  207.  
  208. ;------------------------------------------------------------------------------
  209. ;
  210. ; Usage report (before postprocessing)
  211. ;
  212. ; ■ Statements used :
  213. ;
  214. ;    12      End
  215. ;    44      Goto 
  216. ;    31      Let 
  217. ;    28      PrintLn 
  218. ;    20      If 
  219. ;    2       DispFile 
  220. ;    2       FOpen 
  221. ;    3       FClose 
  222. ;    4       FGet 
  223. ;    1       GetUser
  224. ;    1       Gosub 
  225. ;    1       Return
  226. ;    3       Newline
  227. ;    2       Tokenize 
  228. ;    3       Call 
  229. ;    1       FSeek 
  230. ;    1       FRead 
  231. ;    1       GetAltUser 
  232. ;
  233. ;
  234. ; ■ Functions used :
  235. ;
  236. ;    2       -
  237. ;    27      +
  238. ;    1       -
  239. ;    15      ==
  240. ;    2       >=
  241. ;    18      !
  242. ;    4       ||
  243. ;    5       Len(
  244. ;    10      Upper()
  245. ;    31      Left()
  246. ;    22      Right()
  247. ;    1       Ferr()
  248. ;    1       U_LDate()
  249. ;    1       U_LTime()
  250. ;    12      PPEPath()
  251. ;    2       SysopSec()
  252. ;    8       GetToken()
  253. ;    6       Exist()
  254. ;    1       TokenStr()
  255. ;    4       PPEName()
  256. ;    2       TokCount()
  257. ;    1       U_RecNum()
  258. ;    2       Mixed()
  259. ;
  260. ;------------------------------------------------------------------------------
  261. ;
  262. ; Analysis flags : RCs
  263. ;
  264. ; R - Read user ■ 5
  265. ;     User records are read, this may signify that someone wants to get
  266. ;     various informations about a user (for example his password), but
  267. ;     this may also be normal for a program accessing user records (for
  268. ;     example a User Editor)
  269. ;     ■ Search for : GETALTUSER
  270. ;
  271. ; C - Call child PPE ■ 3
  272. ;     This is usually normal, but may be a tricky way to launch some
  273. ;     sysop-only commands.
  274. ;     ■ Search for : CALL
  275. ;
  276. ; s - Sysop level access ■ 5
  277. ;     Program is reading the sysop access level, this may be normal
  278. ;     but still it is very suspect. It is the best way to give a user
  279. ;     all priviledges. Check!
  280. ;     ■ Search for : SYSOPSEC()
  281. ;
  282. ;------------------------------------------------------------------------------
  283. ;
  284. ; Postprocessing report
  285. ;
  286. ;    0       For/Next
  287. ;    0       While/EndWhile
  288. ;    10      If/Then or If/Then/Else
  289. ;    1       Select Case
  290. ;
  291. ;------------------------------------------------------------------------------
  292. ;                 AEGiS Corp - Break the routines, code against the machines!
  293. ;------------------------------------------------------------------------------
  294.